-- GENERATED SPELL FOR [Corrupted Lothalor Ancient] --


function spell0_26333(pUnit, Event) --@Arcane Discharge,Self--
pUnit:FullCastSpellOnTarget(51727,pUnit)
pUnit:RegisterEvent('Sorts_26333', 655, 1)
end

function spell1_26333(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(51725,pUnit)
pUnit:RegisterEvent('Sorts_26333', 522, 1)
end

function Sorts_26333(pUnit, Event)
local choix_sorts_26333 = math.random(0, 1)
if choix_sorts_26333 == 0 then
pUnit:RegisterEvent('spell0_26333', 1, 1)
end
if choix_sorts_26333 == 1 then
pUnit:RegisterEvent('spell1_26333', 1, 1)
end
end

function mob26333_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26333', math.random(1500, 3000), 1)
end

function mob26333_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26333_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26333_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26333, 1, 'mob26333_Action')
RegisterUnitEvent(26333, 2, 'mob26333_Leave')
RegisterUnitEvent(26333, 3, 'mob26333_Kill')
RegisterUnitEvent(26333, 4, 'mob26333_Die')
